.class public Lcom/jecelyin/editor/v2/adapter/EditorAdapter;
.super Lcom/jecelyin/common/adapter/ViewPagerAdapter;
.source "EditorAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;
    }
.end annotation


# instance fields
.field private final b:Landroid/content/Context;

.field private c:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/jecelyin/editor/v2/ui/b;",
            ">;"
        }
    .end annotation
.end field

.field private d:I

.field private e:Les/wf0;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/jecelyin/common/adapter/ViewPagerAdapter;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    .line 3
    iput-object p1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;)Landroid/content/Context;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;Les/wf0;)Les/wf0;
    .locals 0

    .line 3
    iput-object p1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->e:Les/wf0;

    return-object p1
.end method

.method private a(I)V
    .locals 3

    .line 27
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-gt v0, p1, :cond_0

    goto :goto_0

    .line 28
    :cond_0
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/jecelyin/editor/v2/ui/b;

    .line 29
    iget-object v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    check-cast v1, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;

    .line 30
    invoke-virtual {v1}, Lcom/jecelyin/editor/v2/ui/JeEditorActivity;->B()Lcom/jecelyin/editor/v2/view/TabViewPager;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, p1, v2}, Lcom/jecelyin/editor/v2/view/TabViewPager;->a(ILcom/jecelyin/editor/v2/view/TabViewPager$d;)I

    .line 31
    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/b;->p()V

    .line 32
    invoke-virtual {p0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    :cond_1
    :goto_0
    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;I)V
    .locals 0

    .line 4
    invoke-direct {p0, p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(I)V

    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;ILcom/jecelyin/editor/v2/common/d;Z)V
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2, p3}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b(ILcom/jecelyin/editor/v2/common/d;Z)V

    return-void
.end method

.method private b(ILcom/jecelyin/editor/v2/common/d;Z)V
    .locals 9

    .line 4
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/jecelyin/editor/v2/ui/b;

    .line 5
    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/b;->c()Ljava/lang/String;

    move-result-object v7

    .line 6
    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v6

    .line 7
    iget-object v0, v0, Lcom/jecelyin/editor/v2/ui/b;->b:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    if-eqz v0, :cond_0

    .line 8
    new-instance v8, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$c;

    move-object v1, v8

    move-object v2, p0

    move v3, p3

    move v4, p1

    move-object v5, p2

    invoke-direct/range {v1 .. v7}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$c;-><init>(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;ZILcom/jecelyin/editor/v2/common/d;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v8}, Lcom/jecelyin/editor/v2/widget/text/EditAreaView;->c(Lcom/jecelyin/editor/v2/widget/text/c;)V

    goto :goto_0

    :cond_0
    if-eqz p3, :cond_1

    .line 9
    invoke-direct {p0, p1}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(I)V

    :cond_1
    if-eqz p2, :cond_2

    const/4 v5, 0x0

    const/4 p3, 0x0

    move-object v1, p2

    move v2, p1

    move-object v3, v6

    move-object v4, v7

    move v6, p3

    .line 10
    invoke-interface/range {v1 .. v6}, Lcom/jecelyin/editor/v2/common/d;->a(ILjava/lang/String;Ljava/lang/String;II)V

    :cond_2
    :goto_0
    return-void
.end method


# virtual methods
.method public a()I
    .locals 3

    .line 17
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    const/4 v1, 0x0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/jecelyin/editor/v2/ui/b;

    .line 18
    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_0

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    return v1
.end method

.method public a(ILandroid/view/ViewGroup;)Landroid/view/View;
    .locals 3

    .line 5
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    sget v1, Lcom/jecelyin/editor/v2/k;->je_editor:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, p2, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p2

    check-cast p2, Lcom/jecelyin/editor/v2/view/EditorView;

    .line 6
    invoke-virtual {p0, p1, p2}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ILcom/jecelyin/editor/v2/view/EditorView;)V

    return-object p2
.end method

.method public a(ILcom/jecelyin/editor/v2/view/EditorView;)V
    .locals 1

    .line 14
    invoke-virtual {p0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->getCount()I

    move-result v0

    if-lt p1, v0, :cond_0

    return-void

    .line 15
    :cond_0
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/jecelyin/editor/v2/ui/b;

    if-eqz p1, :cond_1

    .line 16
    invoke-virtual {p1, p2}, Lcom/jecelyin/editor/v2/ui/b;->a(Lcom/jecelyin/editor/v2/view/EditorView;)V

    :cond_1
    return-void
.end method

.method public a(Lcom/jecelyin/editor/v2/utils/ExtGrep;)V
    .locals 8

    .line 12
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/b;

    iget-object v2, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    iget-object v3, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    sget v4, Lcom/jecelyin/editor/v2/m;->je_find_title:I

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/utils/ExtGrep;->b()Ljava/lang/String;

    move-result-object v6

    const/4 v7, 0x0

    aput-object v6, v5, v7

    invoke-virtual {v3, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v1, v2, v3, p1}, Lcom/jecelyin/editor/v2/ui/b;-><init>(ILjava/lang/String;Landroid/os/Parcelable;)V

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 13
    invoke-virtual {p0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public a(Ljava/io/File;IILjava/lang/String;)V
    .locals 6
    .param p1    # Ljava/io/File;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    const/4 v1, 0x1

    move-object v0, p0

    move-object v2, p1

    move v3, p2

    move v4, p3

    move-object v5, p4

    .line 7
    invoke-virtual/range {v0 .. v5}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ZLjava/io/File;IILjava/lang/String;)V

    return-void
.end method

.method public a(Ljava/lang/String;Ljava/lang/CharSequence;)V
    .locals 3
    .param p2    # Ljava/lang/CharSequence;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 10
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/b;

    iget-object v2, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    invoke-direct {v1, v2, p1, p2}, Lcom/jecelyin/editor/v2/ui/b;-><init>(ILjava/lang/String;Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 11
    invoke-virtual {p0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public a(ZLjava/io/File;IILjava/lang/String;)V
    .locals 8
    .param p2    # Ljava/io/File;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 8
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    new-instance v7, Lcom/jecelyin/editor/v2/ui/b;

    iget-object v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v2

    move-object v1, v7

    move-object v3, p2

    move v4, p3

    move v5, p4

    move-object v6, p5

    invoke-direct/range {v1 .. v6}, Lcom/jecelyin/editor/v2/ui/b;-><init>(ILjava/io/File;IILjava/lang/String;)V

    invoke-virtual {v0, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    if-eqz p1, :cond_0

    .line 9
    invoke-virtual {p0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    :cond_0
    return-void
.end method

.method public a(ILcom/jecelyin/editor/v2/common/d;)Z
    .locals 6

    if-gez p1, :cond_0

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    move-object v0, p2

    move v1, p1

    .line 33
    invoke-interface/range {v0 .. v5}, Lcom/jecelyin/editor/v2/common/d;->a(ILjava/lang/String;Ljava/lang/String;II)V

    :cond_0
    const/4 v0, 0x0

    if-ltz p1, :cond_1

    .line 34
    invoke-virtual {p0, p1, p2, v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ILcom/jecelyin/editor/v2/common/d;Z)Z

    move-result p1

    if-eqz p1, :cond_2

    :cond_1
    const/4 v0, 0x1

    :cond_2
    return v0
.end method

.method public a(ILcom/jecelyin/editor/v2/common/d;Z)Z
    .locals 11

    .line 19
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    move-object v6, v0

    check-cast v6, Lcom/jecelyin/editor/v2/ui/b;

    const/4 v0, 0x1

    .line 20
    invoke-static {v0}, Lcom/jecelyin/editor/v2/ui/b;->a(Z)V

    .line 21
    invoke-virtual {v6}, Lcom/jecelyin/editor/v2/ui/b;->i()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 22
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->e:Les/wf0;

    const/4 v7, 0x0

    if-eqz v0, :cond_0

    return v7

    .line 23
    :cond_0
    new-instance v0, Les/wf0;

    iget-object v8, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b:Landroid/content/Context;

    invoke-virtual {v6}, Lcom/jecelyin/editor/v2/ui/b;->g()Ljava/lang/String;

    move-result-object v9

    new-instance v10, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$a;

    move-object v1, v10

    move-object v2, p0

    move v3, p1

    move-object v4, p2

    move v5, p3

    invoke-direct/range {v1 .. v6}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$a;-><init>(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;ILcom/jecelyin/editor/v2/common/d;ZLcom/jecelyin/editor/v2/ui/b;)V

    invoke-direct {v0, v8, v9, v10}, Les/wf0;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;)V

    iput-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->e:Les/wf0;

    .line 24
    new-instance p1, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$b;

    invoke-direct {p1, p0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$b;-><init>(Lcom/jecelyin/editor/v2/adapter/EditorAdapter;)V

    invoke-virtual {v0, p1}, Les/wf0;->a(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 25
    iget-object p1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->e:Les/wf0;

    invoke-virtual {p1}, Les/wf0;->c()V

    return v7

    .line 26
    :cond_1
    invoke-direct {p0, p1, p2, p3}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->b(ILcom/jecelyin/editor/v2/common/d;Z)V

    return v0
.end method

.method public b()Lcom/jecelyin/editor/v2/ui/b;
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    iget v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->d:I

    iget-object v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-lt v0, v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    iget v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->d:I

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/jecelyin/editor/v2/ui/b;

    return-object v0

    :cond_1
    :goto_0
    const/4 v0, 0x0

    return-object v0
.end method

.method public b(ILcom/jecelyin/editor/v2/common/d;)Z
    .locals 1

    const/4 v0, 0x1

    .line 3
    invoke-virtual {p0, p1, p2, v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ILcom/jecelyin/editor/v2/common/d;Z)Z

    move-result p1

    return p1
.end method

.method public c()[Lcom/jecelyin/editor/v2/common/e;
    .locals 7

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 2
    new-array v1, v0, [Lcom/jecelyin/editor/v2/common/e;

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_0

    .line 3
    iget-object v3, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/jecelyin/editor/v2/ui/b;

    .line 4
    new-instance v4, Lcom/jecelyin/editor/v2/common/e;

    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->g()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->f()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->i()Z

    move-result v3

    invoke-direct {v4, v5, v6, v3}, Lcom/jecelyin/editor/v2/common/e;-><init>(Ljava/lang/String;Ljava/lang/String;Z)V

    aput-object v4, v1, v2

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-object v1
.end method

.method public d()Les/lf0;
    .locals 3

    .line 1
    new-instance v0, Les/lf0;

    new-instance v1, Ljava/util/ArrayList;

    iget-object v2, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    invoke-direct {v0, v1}, Les/lf0;-><init>(Ljava/util/ArrayList;)V

    return-object v0
.end method

.method public getCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Lcom/jecelyin/editor/v2/ui/b;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lt p1, v0, :cond_0

    const/4 p1, 0x0

    return-object p1

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/jecelyin/editor/v2/ui/b;

    return-object p1
.end method

.method public getItemPosition(Ljava/lang/Object;)I
    .locals 0

    .line 1
    check-cast p1, Lcom/jecelyin/editor/v2/view/EditorView;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/view/EditorView;->a()Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, -0x2

    goto :goto_0

    :cond_0
    const/4 p1, -0x1

    :goto_0
    return p1
.end method

.method public restoreState(Landroid/os/Parcelable;Ljava/lang/ClassLoader;)V
    .locals 3

    .line 1
    instance-of p2, p1, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;

    if-nez p2, :cond_0

    return-void

    .line 2
    :cond_0
    check-cast p1, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;->a:[Lcom/jecelyin/editor/v2/ui/b$s;

    .line 3
    iget-object p2, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {p2}, Ljava/util/ArrayList;->clear()V

    const/4 p2, 0x0

    .line 4
    :goto_0
    array-length v0, p1

    if-ge p2, v0, :cond_1

    .line 5
    iget-object v0, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/b;

    aget-object v2, p1, p2

    invoke-direct {v1, v2}, Lcom/jecelyin/editor/v2/ui/b;-><init>(Lcom/jecelyin/editor/v2/ui/b$s;)V

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 p2, p2, 0x1

    goto :goto_0

    .line 6
    :cond_1
    invoke-virtual {p0}, Landroidx/viewpager/widget/PagerAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public saveState()Landroid/os/Parcelable;
    .locals 4

    .line 1
    new-instance v0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;

    invoke-direct {v0}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;-><init>()V

    .line 2
    iget-object v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/jecelyin/editor/v2/ui/b$s;

    iput-object v1, v0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;->a:[Lcom/jecelyin/editor/v2/ui/b$s;

    .line 3
    iget-object v1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    :goto_0
    if-ltz v1, :cond_0

    .line 4
    iget-object v2, v0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter$d;->a:[Lcom/jecelyin/editor/v2/ui/b$s;

    iget-object v3, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->c:Ljava/util/ArrayList;

    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/jecelyin/editor/v2/ui/b;

    invoke-virtual {v3}, Lcom/jecelyin/editor/v2/ui/b;->n()Landroid/os/Parcelable;

    move-result-object v3

    check-cast v3, Lcom/jecelyin/editor/v2/ui/b$s;

    aput-object v3, v2, v1

    add-int/lit8 v1, v1, -0x1

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method public setPrimaryItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
    .locals 0

    .line 1
    invoke-super {p0, p1, p2, p3}, Lcom/jecelyin/common/adapter/ViewPagerAdapter;->setPrimaryItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V

    .line 2
    iget p1, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->d:I

    if-ne p1, p2, :cond_0

    return-void

    .line 3
    :cond_0
    iput p2, p0, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->d:I

    .line 4
    check-cast p3, Lcom/jecelyin/editor/v2/view/EditorView;

    invoke-virtual {p0, p2, p3}, Lcom/jecelyin/editor/v2/adapter/EditorAdapter;->a(ILcom/jecelyin/editor/v2/view/EditorView;)V

    return-void
.end method
